package com.chazz.service.impl;

import com.chazz.dao.CategoryidDao;
import com.chazz.dao.GoodsDao;
import com.chazz.dao.impl.CategoryidDaoImpl;
import com.chazz.dao.impl.GoodsDaoImple;
import com.chazz.entity.Goods;
import com.chazz.service.GoodsService;

import java.util.List;

public class GoodsServiceImpl implements GoodsService {
    CategoryidDao categoryidDao = new CategoryidDaoImpl();
    GoodsDao goodsDao = new GoodsDaoImple();

    /**
     * 根据分类id查询分类商品信息
     *
     * @param categoryname
     * @return
     */
    @Override
    public List<Goods> findGoodsList(String categoryname) {
        return goodsDao.GoodsBlurryQuery(categoryidDao.findCategoryId(categoryname));
    }
}
